<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="entity.tUser"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	tUser tuser = (tUser) session.getAttribute("user");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>个人-水处理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="css/style.css" rel="stylesheet" type="text/css" />

		<script src="js/jquery-1.8.2.min.js" type="text/javascript">
</script>
		<script src="js/jquery.carouFredSel-6.0.4-packed.js"
			type="text/javascript">
</script>
		<script type="text/javascript" src="js/check.js">
</script>
		<style type="text/css">
<!--
.span1 {
	margin-left: 5px;
	width: 200px;
	font-size: 14px;
}

.span2 {
	font-size: 14px;
	margin-left: 5px;
}

.span3 {
	font-size: 14px;
	margin-left: 5px;
}

.wenz {
	margin-top: 1px;
}
-->
</style>
	</head>
	<body>

		<s:if test="result != null">
			<script type="text/javascript">
				alert('${result}');
				window.window.location.href = 'personl.jsp';
			</script>
		</s:if>

		<div class="main">
			<jsp:include page="conter/header.jsp"></jsp:include>
			<div class="certen">
				<jsp:include page="conter/deviceLeft.jsp"></jsp:include>
				<div class="content">
					<div class="mainbar">
						<div class="runbutton">
							<h2>
								<span style="letter-spacing: 20px; margin-left: 32px;">个人设置</span>
							</h2>
							<div class="clr"></div>
						</div>
						<div class="article">
							<div class="device">
								<div class="d_person">
									<form
										action="updatePersonAction?userId=${sessionScope.user.userId }"
										method="post">
										<ol>
											<li>
												<label>
													用户名：
												</label>
												<input class="text" type="text" id="userName"
													name="userName" value="${sessionScope.user.userName}" />
											</li>
											<li>
												<label>
													姓名：
												</label>
												<input class="text" type="text" id="trueName"
													name="trueName" value="${sessionScope.user.trueName}" />
											</li>
											<li>
												<label>
													级别：

													<s:if test="#session.user.grade == 2">
										          		管理员
										          </s:if>
													<s:if test="#session.user.grade == 1">
										          		区域代理
										          </s:if>
													<s:if test="#session.user.grade == 0">
										          		客户
										          </s:if>
												</label>
											</li>
											<li>
												<label>
													邮箱：
												</label>
												<input class="text" type="text" id="email" name="email"
													value="${sessionScope.user.email}" />
											</li>
											<li>
												<label>
													手机：
												</label>
												<input class="text" type="text" id="mobilePhone"
													name="mobilePhone" value="${sessionScope.user.mobilePhone}" />
											</li>
											<li>
												<label>
													电话：
												</label>
												<input class="text" type="text" id="phone" name="phone"
													value="${sessionScope.user.phone}" />
											</li>
											<li>
												<input type="image" name="imageField" src="images/alter.jpg"
													class="send" />
												<input type="image" name="imageres" src="images/raset.jpg"
													class="send1" onclick="reset();return false;" />
											</li>
										</ol>
									</form>
								</div>
								<div class="d_psw">
									<label
										style="color: #1686B6; font-size: 24px; font-weight: bold; margin-left: -70px;">
										密码修改
									</label>
									<form name="form_pass"
										action="alterPassword?userId=${sessionScope.user.userId }"
										method="post">
										<ol>
											<li>
												<label>
													原始密码：
												</label>
												<input id="oldpass" name="oldpass" class="text"
													type="password" onfocus="foucs_old()" onblur="blur_old()" />
												<div id="span_oldpass" class="span1">
													<img src="images/reg1.gif" />
													<span class="wenz">请输入原密码</span>
												</div>
											</li>
											<li>
												<label>
													新密码：
												</label>
												<input id="newpass" name="newpass" class="text"
													type="password" onfocus="foucs_new()" onblur="blur_new()" />
												<div id="span_newpass" class="span1">
													<img src="images/reg1.gif" />
													<span class="wenz">请输入新密码</span>
												</div>
											</li>
											<li>
												<label>
													确认密码：
												</label>
												<input id="repass" name="repass" class="text"
													type="password" onfocus="foucs_renew()"
													onblur="blur_renew()" />
												<div id="span_repass" class="span1">
													<img src="images/reg1.gif" />
													<span class="wenz">请再次输入新密码</span>
												</div>
											</li>
											<li>
												<input type="image" name="imageField" src="images/alter.jpg"
													class="send" />
												<input type="image" name="imageres" src="images/raset.jpg"
													class="send1" onclick="reset();return false;" />
												<div class="clr"></div>
											</li>
										</ol>
									</form>
								</div>
							</div>
						</div>
						<div class="clr"></div>
					</div>
				</div>
				<div class="fbg">
					<div class="fbg_resize">
						<jsp:include page="conter/slide.jsp"></jsp:include>
					</div>
				</div>
				<jsp:include page="conter/footer.jsp"></jsp:include>
			</div>
	</body>
</html>